<!DOCTYPE html>
<html lang="en">
<head>
      <meta charset="UTF-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>prop</title>
      <script src="vue.js"></script>
</head>
<body>
  <div id="id-d-c-r">
        Enter: <input v-model="instr">
        <reverse-string v-bind:msg="instr"></reverse-string>
      </div>
  <script>
    Vue.component('reverse-string', {
        props: ['msg'],
        computed: {
            revstr: function() {
                return this.msg.split('').reverse().join('');
            }
        },
        template: '<p>Reverse string: {{revstr}}.<p>'
    });

    var vm = new Vue({
        el: '#id-d-c-r',
        data: {
            instr: "pls enter string to reserves........"
        }
    });
</script>
</body>
</html>